package com.cskaoyan.model.vo;

import com.cskaoyan.model.Goods;
import com.cskaoyan.model.GoodsAttribute;
import com.cskaoyan.model.GoodsProduct;
import com.cskaoyan.model.GoodsSpecification;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @program: mall38
 * @description:
 * @author: Wang
 * @create: 2022-05-07 16:18
 **/

@Data
@NoArgsConstructor
public class GoodsDetailVO {

    List<Integer> categoryIds;
    Goods goods;
    List<GoodsSpecification> specifications;
    List<GoodsProduct> products;
    List<GoodsAttribute> attributes;

    public static GoodsDetailVO data(List<Integer> categoryIds, Goods goods, List<GoodsSpecification> specifications, List<GoodsProduct> products, List<GoodsAttribute> attributes) {
        GoodsDetailVO GoodsDetailVO = new GoodsDetailVO();
        GoodsDetailVO.setGoods(goods);
        GoodsDetailVO.setCategoryIds(categoryIds);
        GoodsDetailVO.setSpecifications(specifications);
        GoodsDetailVO.setAttributes(attributes);
        GoodsDetailVO.setProducts(products);
        return GoodsDetailVO;
    }
}
